<?php
class Shop_Model_Product extends Zend_Db_Table
 {
       	protected $_name="product";
       	protected $_primary = 'id';
        
 		public function insertProduct($arrParam = null, $option = null)
	  	{	
	  		$row = $this->fetchNew();		  	
			$row->detail       =$arrParam['detail'];						
			$row->shopid       =$arrParam['shopid'];
			$row->sku       =$arrParam['sku'];
			$row->image       =$arrParam['image'];
			$row->stock       =$arrParam['stock'];
			$row->createdate  =date('Y-m-d h:i:s',time());
			
		  	return $row->save();
	  	}
	  	
 		public function getItemById($id){
	
	  		$db = Zend_Registry::get('connectDB');		
			$sql = "SELECT *  FROM product where id =  '".$id."'";
	  		
			return $db->fetchRow($sql);
	  	
	  		
	  	}
        
 }